package twi.filter.impl;

import twi.filter.Filter;

import com.hp.hpl.jena.rdf.model.RDFNode;
import com.hp.hpl.jena.vocabulary.RDFS;

public class DomainRangeFilter implements Filter {

	public boolean ignore = false;

	public DomainRangeFilter(boolean b) {
		this.ignore = b;
	}

	@Override
	public boolean isValid(RDFNode node) {
		boolean r = false;
		if (node == null)
			return false;
		if (node.asNode().equals(RDFS.domain.asNode()))
			r = true;
		if (node.asNode().equals(RDFS.range.asNode()))
			r = true;
		if (ignore)
			return !r;

		return r;
	}

	@Override
	public void decodeString(String filterString) {
		// TODO Auto-generated method stub

	}

	@Override
	public String encodeString() {
		// TODO Auto-generated method stub
		return null;
	}

}
